<% @page_title = "#{area_name(params[:id].to_i)}地区的学校信息 | 多背一公斤 - 灾后学校重建计划" -%>

<% content_for :sidebar do -%>
  <p style="color:red">按 Ctrl+F 进行页内搜索，可以快速查找本页的学校名称。如果没有，请提交学校信息</p>
  <h2><%= link_to "提交新的学校信息", new_school_url(:area => params[:id].to_i, :ref => 'dizhen.1kg.org'), :target => '_blank' %></h2>
  <h2 class="pink">地震灾区 <%= title_suffix %></h2>
  <%= render :partial => "/dizhen/shared/disasters" %>
<% end -%>

<h1><%= area_name(params[:id].to_i) %>地区的学校信息</h1>
<table border="0" cellspacing="0" cellpadding="2" width="98%" class="left ol">
  <tr>
    <th>校名</th>
    <th>照片</th>
    <th>消息</th>
    <th>最后更新日期</th>
  </tr>
  <% @schools.each do |school| %>
    <tr>
      <td width="40%"><%= link_to_school_page school, :target => '_blank' %></td>
      <td width="15%"><%= count_display school.photo_count.to_i %></td>
      <td width="15%"><%= count_display school.comment_count.to_i %></td>
      <td><span class="tip"><%= show_datetime school.updated_at %></span></td>
    </tr>
  <% end %>
</table>